﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using daSyntaxAnalyser.SyntaxTree;

namespace CQLQueries.SyntaxTree
{
    public class ExpressionNode
    {
        public object NodeTree;
        public object ValueUp;

        public TermNode Term;
        public Expression2Node Expression2;

        public ExpressionNode()
        {
        }

        public void Visit()
        {
            Term.NodeTree = NodeTree;
            Term.Visit();
            if (Expression2 != null)
            {
                Expression2.ValueDown = Term.ValueUp;
                Expression2.NodeTree = NodeTree;
                Expression2.Visit();
                ValueUp = Expression2.ValueUp;
            }
            else ValueUp = Term.ValueUp;
        }
    }
}
